package com.llb666.shop.items.infrastructure.mapper;


import com.llb666.common.core.tk.mapper.MyMapper;
import com.llb666.shop.items.domain.entity.bo.ItemsCommentBo;
import com.llb666.shop.items.domain.entity.bo.MyCommentBo;
import com.llb666.shop.items.infrastructure.po.ItemsCommentsPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author llb666
 */
@Repository
public interface ItemsCommentsMapper extends MyMapper<ItemsCommentsPo> {

    /**
     * 发表评论
     * @param map map
     */
    void saveComments(Map<String, Object> map);

    /**
     * 查看我的评论
     * @param userId 用户
     * @return 评论列表
     */
    public List<MyCommentBo> queryMyComments(@Param("userId") String userId);

    /**
     * 查看商品评论
     * @param map map
     * @return 评论列表
     */
    public List<ItemsCommentBo> queryItemComments(@Param("paramsMap") Map<String, Object> map);

}